Optimal. Leaf size=51 \[ -\frac {(b c-a d)^2}{b^3 (a+b x)}+\frac {2 d (b c-a d) \log (a+b x)}{b^3}+\frac {d^2 x}{b^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {43} \begin {gather*} -\frac {(b c-a d)^2}{b^3 (a+b x)}+\frac {2 d (b c-a d) \log (a+b x)}{b^3}+\frac {d^2 x}{b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{(a+b x)^2} \, dx &=\int \left (\frac {d^2}{b^2}+\frac {(b c-a d)^2}{b^2 (a+b x)^2}+\frac {2 d (b c-a d)}{b^2 (a+b x)}\right ) \, dx\\ &=\frac {d^2 x}{b^2}-\frac {(b c-a d)^2}{b^3 (a+b x)}+\frac {2 d (b c-a d) \log (a+b x)}{b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 47, normalized size = 0.92 \begin {gather*} \frac {-\frac {(b c-a d)^2}{a+b x}+2 d (b c-a d) \log (a+b x)+b d^2 x}{b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(c+d x)^2}{(a+b x)^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 92, normalized size = 1.80 \begin {gather*} \frac {b^{2} d^{2} x^{2} + a b d^{2} x - b^{2} c^{2} + 2 \, a b c d - a^{2} d^{2} + 2 \, {\left (a b c d - a^{2} d^{2} + {\left (b^{2} c d - a b d^{2}\right )} x\right )} \log \left (b x + a\right )}{b^{4} x + a b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.96, size = 98, normalized size = 1.92 \begin {gather*} \frac {{\left (b x + a\right )} d^{2}}{b^{3}} - \frac {2 \, {\left (b c d - a d^{2}\right )} \log \left (\frac {{\left | b x + a \right |}}{{\left (b x + a\right )}^{2} {\left | b \right |}}\right )}{b^{3}} - \frac {\frac {b^{3} c^{2}}{b x + a} - \frac {2 \, a b^{2} c d}{b x + a} + \frac {a^{2} b d^{2}}{b x + a}}{b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 86, normalized size = 1.69 \begin {gather*} -\frac {a^{2} d^{2}}{\left (b x +a \right ) b^{3}}+\frac {2 a c d}{\left (b x +a \right ) b^{2}}-\frac {2 a \,d^{2} \ln \left (b x +a \right )}{b^{3}}-\frac {c^{2}}{\left (b x +a \right ) b}+\frac {2 c d \ln \left (b x +a \right )}{b^{2}}+\frac {d^{2} x}{b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.01, size = 67, normalized size = 1.31 \begin {gather*} \frac {d^{2} x}{b^{2}} - \frac {b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}}{b^{4} x + a b^{3}} + \frac {2 \, {\left (b c d - a d^{2}\right )} \log \left (b x + a\right )}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.36, size = 71, normalized size = 1.39 \begin {gather*} \frac {d^2\,x}{b^2}-\frac {a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}{b\,\left (x\,b^3+a\,b^2\right )}-\frac {\ln \left (a+b\,x\right )\,\left (2\,a\,d^2-2\,b\,c\,d\right )}{b^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.63, size = 60, normalized size = 1.18 \begin {gather*} \frac {- a^{2} d^{2} + 2 a b c d - b^{2} c^{2}}{a b^{3} + b^{4} x} + \frac {d^{2} x}{b^{2}} - \frac {2 d \left (a d - b c\right ) \log {\left (a + b x \right )}}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________